﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Product.Master" Inherits="System.Web.Mvc.ViewPage<SDT.Site.ViewModels.DemandDetailsModels>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%=Model.Demand != null ? Html.Encode(Model.Demand.Title) : string.Empty%>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="content">
    <div class="pro-detail">
        <h2><%=Html.Encode(Model.Demand.Title) %></h2>
        <h3><label>Mô tả <%=Model.Demand.DemandCategory.Name %></label></h3>
        <pre style="margin: 0px 5px 0 5px;">
            <%=Model.Demand.Description%>
        </pre>
        <div class="pinfo">
                Giá:
                <span>
                    <%=Model.Demand.Cost != null && Model.Demand.Cost > 0 ? SDT.Lib.Common.Utils.ReadNumber(Model.Demand.CurrencyID.HasValue && Model.Demand.CurrencyID.Value == 1 ? (double)Model.Demand.Cost : (double)Model.Demand.TotalCost) + "&nbsp;" + Model.Demand.UnitCost : "Thỏa thuận"%></span>
                <span class="pad">&nbsp;</span>
                Diện tích:  <span><%=Model.Demand.Area%>m&sup2;</span> <span class="pad">&nbsp;</span>
                Quận/huyện: <span><%=Html.Encode(Model.Demand.District.Name)%>,&nbsp;<%=Html.Encode(Model.Demand.City.Name)%></span>
        </div>        
        <div class="pro-dt">
            <div class="bg-title">
                <h4>Thông tin chi tiết</h4>
            </div>
            <ul>                              
                <li>
                    <div class="it_l">Ngày đăng tin</div>
                    <div class="it_r"><%=Model.Demand.AddDate.Value.ToString("dd/MM/yyyy") %></div>
                    <div class="clear"></div>
                </li>
                <li>
                    <div class="it_l">Ngày hết hạn</div>
                    <div class="it_r"><%=Model.Demand.ExpireDate.HasValue ? Model.Demand.ExpireDate.Value.ToString("dd/MM/yyyy") : string.Empty%></div>
                    <div class="clear"></div>
                </li>
                <li>
                    <div class="it_l">Mã số</div>
                    <div class="it_r"><%=Model.Demand.ID%></div>
                    <div class="clear"></div>
                </li>
            </ul>
            <div class="clear"></div>
            <div class="bg-title">
                <h4>Thông tin liên hệ</h4>
            </div>
            <ul>
                <li>
                    <div class="it_l">Đăng bởi</div>
                    <div class="it_r"><%=Html.Encode(Model.Demand.ContactName) %></div>
                    <div class="clear"></div>
                </li>
                <li>
                    <div class="it_l">Địa chỉ</div>
                    <div class="it_r"><%=Html.Encode(Model.Demand.ContactAddress)%></div>
                    <div class="clear"></div>
                </li>
                <li>
                    <div class="it_l">Điện thoại</div>
                    <div class="it_r"><%=Html.Encode(Model.Demand.ContactMobile)%></div>
                    <div class="clear"></div>
                </li>
             </ul>
        </div>
    </div>
    <div class="clear">&nbsp;</div>
    <%if (Model.Demand != null)
      { %>
    <% Html.RenderAction("LatestComments", new { id = Model.Demand.ID, number = 20 }); %>
    <% Html.RenderAction("Comment", new { id = Model.Demand.ID }); %>
    <%} %>
    <div class="clear"></div>
    <% Html.RenderAction("OtherItems", "Demand", new { id = Model.Demand.ID, number = 3, title = "Tin liên quan" }); %>
    <div class="clear"></div>
    <% Html.RenderAction("OtherItemsInCity", "Demand", new { id = Model.Demand.ID, number = 5, title = "Các tin khác" }); %>
</div>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="PathContent" runat="server">
<% Html.RenderPartial("~/Views/Demand/Path.ascx", Model.DemandSearch); %>
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="LeftContent" runat="server">
<% Html.RenderPartial("~/Views/Demand/Left.ascx", Model.DemandSearch); %>
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="RightContent" runat="server">
    <% Html.RenderPartial("~/Views/Demand/SearchSmall.ascx", Model.DemandSearch); %>
    <div class="clear"></div>
    <% Html.RenderAction("Hot", "Project", new { number = 3, catid = 0, hotYN = 1, pubYN = 1, title = "Dự án nổi bật", prjorder = "ID", prjorderDir = "desc" }); %>
    <div class="clear"></div>
    <% Html.RenderAction("LastedSmall", "Useful", new { number = 8 }); %>
    <div class="clear"></div>
    <% Html.RenderAction("LastedSmall", "Event", new { number = 5, catid = 0 }); %>    
</asp:Content>
